#version 130 

in vec2 fragmentTexCoord;

uniform sampler2D tex;
//uniform float gamma;

out vec4 fragColor;

void main(void)
{
    float gamma = 0.4;

    vec3 color = texture(tex, fragmentTexCoord).rgb;

    if (fragmentTexCoord.x < 0.50) {
        fragColor.rgb = pow(color, vec3(1.0 / gamma));
    } else {
        fragColor.rgb = color;
    }

    fragColor.a = 1.0;
}